package com.camera.yl.adapter;import androidx.fragment.app.Fragment;import androidx.fragment.app.FragmentManager;import androidx.fragment.app.FragmentStatePagerAdapter;import com.camera.yl.bean.TabBean;import java.util.List;public class HomePagerAdapter extends FragmentStatePagerAdapter {    private List<TabBean> list;    public HomePagerAdapter(FragmentManager fm, List<TabBean> list) {        super(fm);        this.list = list;    }    @Override    public Fragment getItem(int position) {        return  list.get(position).getFragment();    }    @Override    public int getCount() {        return list.size();    }    @Override    public CharSequence getPageTitle(int position) {        return list.get(position).getTitle();    }    public List<TabBean> getData() {        return list;    }    public void setData(List<TabBean> list) {        this.list = list;    }}